home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / pc / Shout3Ddemo / Shout3d_runtime / codebase / models / textureManipulation / fourGradientTextures.s3d next >
Text File  |  2000-11-07  |  2KB  |  84 lines

  1. #VRML V2.0 utf8
  2.  
  3. DirectionalLight {
  4.     direction 1 -2 -3
  5. }
  6. DirectionalLight {
  7.     direction -3 -1 -1
  8.     intensity .5
  9. }
  10. Transform {
  11.     translation -3 0 0
  12.     children Shape {
  13.         appearance Appearance { 
  14.             material Material { diffuseColor 1 1 1 } 
  15.             texture  GradientTexture {
  16.                 url "../images/shared/sky.gif"
  17.                 gradientColors [ 1 0 1, 0 1 1 ]
  18.             }
  19.         }
  20.         geometry Box {}
  21.     }
  22. }
  23. Transform {
  24.     translation 0 0 0
  25.     children Shape {
  26.         appearance Appearance { 
  27.             material Material { diffuseColor 1 1 1 } 
  28.             texture  GradientTexture {
  29.                 width 50
  30.                 height 50
  31.                 gradientColors [ .8 .3 .1, .8 .3 .1, .8 .8 .1 .8 .8 .1 ]
  32.             }
  33.         }
  34.         geometry Cone {}
  35.     }
  36. }
  37. Transform {
  38.     translation 3 0 0
  39.     children Shape {
  40.         appearance Appearance { 
  41.             material Material { diffuseColor 1 1 1 } 
  42.             texture  DEF CYLINDER_TEXTURE GradientTexture {
  43.                 gradientColors [ 1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1]
  44.             }
  45.         }
  46.         geometry Cylinder {}
  47.     }
  48. }
  49. Transform {
  50.     translation 6 0 0
  51.     children Shape {
  52.         appearance Appearance { 
  53.             material Material { diffuseColor 1 1 1 } 
  54.             texture  GradientTexture {
  55.                 gradientColors [ 0 0 0, 1 0 0, 1 0 0, 1 1 1, 1 1 1, 0 0 0, 0 0 0, 1 0 0, 1 0 0, 1 1 1, 1 1 1, 0 0 0 ]
  56.             }
  57.         }
  58.         geometry Sphere {}
  59.     }
  60. }
  61.  
  62. DEF TIME_SENSOR TimeSensor {
  63.     loop TRUE
  64.     cycleInterval 5
  65. }
  66. DEF CYLINDER_GRADIENT_INTERP CoordinateInterpolator {
  67.     key [ 0 .1 .35 .45 .7 .75 1 ]
  68.     keyValue [    
  69.     1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1,
  70.  
  71.     0 0 0, 0 0 0, 0 0 1, 0 0 1, 0 0 0, 0 0 0,
  72.     0 0 0, 0 0 0, 0 0 1, 0 0 1, 0 0 0, 0 0 0,
  73.  
  74.     1 0 0, 1 0 0, .8 .3 .1, .8 .3 .1, 1 0 0, 1 0 0,
  75.     1 0 0, 1 0 0, .8 .3 .1, .8 .3 .1, 1 0 0, 1 0 0,
  76.  
  77.     1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1
  78.     1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1
  79.     ]
  80.     
  81. }
  82. ROUTE TIME_SENSOR.fraction TO CYLINDER_GRADIENT_INTERP.fraction
  83. ROUTE CYLINDER_GRADIENT_INTERP.value TO CYLINDER_TEXTURE.gradientColors
  84.